//
//  DownloadImagesView.swift
//  FileManager-NSCache-HttpDownload
//
//  Created by DaleGuo on 2023/9/19.
//

import SwiftUI

struct DownloadImagesView: View {
    // view只和viewModel绑定
    @StateObject var vm = DownloadImagesViewModel()

    var body: some View {
        NavigationView {
            List {
                ForEach(vm.dataArray) { model in
                    DownloadingImageRowView(model: model)
                }
            }
            .navigationTitle("Scroll Images")
        }
    }
}

struct DownloadImagesView_Previews: PreviewProvider {
    static var previews: some View {
        DownloadImagesView()
    }
}
